#include "SDLSample.h"

SDLSample::SDLSample(void)
{
}

SDLSample::~SDLSample(void)
{
}

void SDLSample::handleEvents(void)
{
	SDL_Event event;
	bool sampleRunning = true;

	while (sampleRunning)
	{
		if (SDL_PollEvent(&event))
		{
			if (event.type == SDL_KEYDOWN)
			{
				SDLKey keyPressed = event.key.keysym.sym;

				switch (keyPressed)
				{
					case SDLK_ESCAPE:
						sampleRunning = false;
						break;
				}
			}
			if(event.type == SDL_QUIT)
			{
				sampleRunning = false;
			}
		}
	}
}
